package com.example.demo;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author Chenjie
 * @Title: LogController
 * @Package com.example.demo
 * @Description:
 * @date 2017/8/11
 */
@Controller
public class LogController {
    private static final Logger logger = LogManager.getLogger(LogController.class);

    @RequestMapping("debug")
    public void testDebug() {
        logger.debug("debug log...................");
    }

    @RequestMapping("info")
    public void info() {
        logger.info("info log...................");
    }

    @RequestMapping("error")
    public void error() {
        logger.error("error log...................");
    }
}
